var args = require('system').args;
var page = require('webpage').create();

if(args.length !== 2) {
  console.log('You must provise user id.');
  phantom.exit();
}

var uid = args[1];

page.open('http://www.infojhc.cn/~' + uid + '/', function() {
  page.render(uid + '.png');
  console.log(uid + '.png created.');
  phantom.exit();
});
